#include "PluginAcctMag.h"
#include <QTableWidget>
#include <QMutex>
#include <QVBoxLayout>

PluginAcctMag* PluginAcctMag::_instance = nullptr;

PluginAcctMag::PluginAcctMag(QWidget* parent)
	: QWidget(parent)
{
	this->setWindowFlags(Qt::FramelessWindowHint);
	InitUI();
}

PluginAcctMag::~PluginAcctMag()
{

}

PluginAcctMag* PluginAcctMag::GetInstance(QWidget* parent /*= nullptr*/)
{
	QMutex mutex;
	mutex.lock();
	if (_instance == nullptr)
	{
		QMutex mutex;
		mutex.lock();
		_instance = new PluginAcctMag(parent);
		mutex.unlock();
	}

	mutex.unlock();
	return _instance;
}

void PluginAcctMag::InitUI()
{
	QVBoxLayout* vLayout = new QVBoxLayout();
	_tableWidget = new QTableWidget(this);
	vLayout->addWidget(_tableWidget);
	this->setLayout(vLayout);
}
